//
//  WMMusicApiResponse.m
//  WholeMusic
//
//  Created by quanxiong on 2018/2/23.
//  Copyright © 2018年 quanxiong. All rights reserved.
//

#import "WMMusicResponseQQ.h"
#import "WMMusic.h"

@implementation WMMusicResponseQQ

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"musicList"  : @"list",};
}

+ (NSDictionary *)modelContainerPropertyGenericClass {
    return @{@"musicList" : [WMMusic class],};
}

@end




@implementation WMMusicResponseVKeyQQ

- (NSString *)musicLink:(WMMusic *)music {
    static NSString *s_guid = @"5150825362";
    if (self.sip.count < 1) {
        return nil;
    }
    NSString *host = self.sip.firstObject;
    NSString *vKey = self.key;
    NSString *mid = music.songmid;
    WMQuality *quality = [music defaultQuality];
    NSString *link = [NSString stringWithFormat:@"%@%@%@.%@?vkey=%@&guid=%@&fromtag=1",
                      host, quality.prefix, mid, quality.suffix, vKey, s_guid];
    return link;
}

@end
